package com.mgm.dto.offer;

import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 
 * @ClassName: OfferRoot
 * @Description: TODO(...)
 * @author Andy Zhang
 * @date 2018年8月11日 下午3:52:06
 *
 */
@JsonIgnoreProperties(value = { "country" })
public class OfferRoot {

	private String offerid;
	private String name;
	private String click_url;
	private BigDecimal pay_price;
	private String pay_type;
	private BigDecimal payout_cap; // 该offer最多跑多少钱 （total_cap）
	private BigDecimal daily_payout_cap; // 该offer一天最多跑多少钱 （daily_cap）
	private Boolean incentive; // 是否需要激励
	private String monitoring; // 检测类型
	private String kpi;
	private String requires;
	private String platform;
	private String pkg_name;
	private String preview_url;
	@JSONField(serialize = false)
	private transient String country;
	private List<String> countries;
	private List<AppDto> apps;
	private List<CreativesDto> creatives;

	/** country 转 list */
	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
		if (country != null) {
			String[] arr = country.split(",");
			setCountries(Arrays.asList(arr));
		}
	}

	/** country 转 list */

	public String getOfferid() {
		return offerid;
	}

	public void setOfferid(String offerid) {
		this.offerid = offerid;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setClick_url(String click_url) {
		this.click_url = click_url;
	}

	public String getClick_url() {
		return click_url;
	}

	public void setPay_price(BigDecimal pay_price) {
		this.pay_price = pay_price;
	}

	public BigDecimal getPay_price() {
		return pay_price;
	}

	public BigDecimal getPayout_cap() {
		return payout_cap;
	}

	public void setPayout_cap(BigDecimal payout_cap) {
		this.payout_cap = payout_cap;
	}

	public BigDecimal getDaily_payout_cap() {
		return daily_payout_cap;
	}

	public void setDaily_payout_cap(BigDecimal daily_payout_cap) {
		this.daily_payout_cap = daily_payout_cap;
	}

	public void setPay_type(String pay_type) {
		this.pay_type = pay_type;
	}

	public String getPay_type() {
		return pay_type;
	}

	public Boolean getIncentive() {
		return incentive;
	}

	public void setIncentive(Boolean incentive) {
		this.incentive = incentive;
	}

	public String getMonitoring() {
		return monitoring;
	}

	public void setMonitoring(String monitoring) {
		this.monitoring = monitoring;
	}

	public String getKpi() {
		return kpi;
	}

	public void setKpi(String kpi) {
		this.kpi = kpi;
	}

	public void setRequires(String requires) {
		this.requires = requires;
	}

	public String getRequires() {
		return requires;
	}

	public String getPlatform() {
		return platform;
	}

	public void setPlatform(String platform) {
		this.platform = platform;
	}

	public String getPkg_name() {
		return pkg_name;
	}

	public void setPkg_name(String pkg_name) {
		this.pkg_name = pkg_name;
	}

	public String getPreview_url() {
		return preview_url;
	}

	public void setPreview_url(String preview_url) {
		this.preview_url = preview_url;
	}

	public void setCountries(List<String> countries) {
		this.countries = countries;
	}

	public List<String> getCountries() {
		return countries;
	}

	public List<AppDto> getApps() {
		return apps;
	}

	public void setApps(List<AppDto> apps) {
		this.apps = apps;
	}

	public void setCreatives(List<CreativesDto> creatives) {
		this.creatives = creatives;
	}

	public List<CreativesDto> getCreatives() {
		return creatives;
	}

}